Bentley Map V8i (SELECTseries 10) Help

Criteria

Criterion is used to test a current property value and then take the appropriate action if the criteria evaluates to TRUE. XFM will evaluate specified criteria to determine symbology to apply, domain list to use, and dialog items to display. The criterion expressions are preprocessed by XFM and then passed into MicroStation's C-expression handler for evaluation. Any valid C language function available in MDL can be used to define criteria. XFM provides a special "COMPARE" function that can also be used to easily compare strings, or to compare a string to a list of possible values. Since many users are not "C" literate, the table below lists some commonly used criteria formats.

An expression may contain zero or more property specifications enclosed in square brackets. XFM will replace each property specification and the square brackets with its current property value.

Criteria Expression

Description

COMPARE("[feature_instance_alias:property_name]", "compareValue", "")

Compare a feature's property value as a string to the string value "compareValue"

COMPARE("[feature_instance_alias:property_name]", "allow1|allow2|allow3", "|")

Compare a feature's property value as a string to see if it exists in the list of strings delimited by the "|" character

COMPARE("[operation_name/property_name]", "compareValue", "")

Compare an operation's property value as a string to the string value "compareValue"

COMPARE("[operation_name/property_name]", "allow1|allow2|allow3", "|")

Compare an operation's property value as a string to see if it exists in the list of strings delimited by the "|" character

[feature_instance_alias:property_name] > testValue

Test to see if the feature value is less than the numeric testValue

[feature_instance_alias:property_name] == testValue

Test to see if the feature value equals the numeric testValue

[feature_instance_alias:property_name] <= testValue

Test to see if the feature value is less than or equal to the numeric testValue

[feature_instance_alias:property_name] >= testValue

Test to see if the feature value is greater than or equal to the numeric testValue

([feature_instance_alias:property_name] >= minValue) && ([feature_instance_alias:property_name] <= maxValue)

Logical "AND" testing of two expressions

([feature_instance_alias:property_name] < minValue) || ([feature_instance_alias:property_name] >= maxValue)

Logical "OR" testing of two expressions

0==strcmp("[feature_instance_alias:property_name]","compareValue")

Compare a feature's property value as a string to the string value "compareValue" using the C string compare function "strcmp".

0!=strlen("[feature_instance_alias:property_name]")

Check if the length of a feature's property value is not zero using the C string length function "strlen".

1==XFMCompareCurrentScaleName("1:1000")

Compare a scale name to the active scale name using the XFM function XFMCompareCurrentScaleName. This function returns 1 if the scale names are equal or 0 otherwise.